package 飞行员兄弟;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    static int N = 4;
    static char[][] g = new char[N][N];
    static char[][] backup = new char[N][N];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        for (int i = 0; i < 4; i++) {
            g[i] = in.next().toCharArray();
            backup[i] = g[i].clone();
        }
        ArrayList<PII> res = new ArrayList<>();
        for (int op = 0; op < 1 << 16; op++) {
            ArrayList<PII> tmp = new ArrayList<>();
            for (int i = 0; i < 4; i++) {
                for (int j = 0; j < 4; j++) {
                    if ((op >> index(i, j) & 1) == 1) {
                        tmp.add(new PII(i, j));
                        turn_all(i, j);
                    }
                }
            }
            boolean flag = false;
            for (int i = 0; i < 4; i++) {
                for (int j = 0; j < 4; j++) {
                    if (g[i][j] == '+') {
                        flag = true;
                        break;
                    }
                }
            }
            if (!flag) {
                if (res.isEmpty() || res.size() > tmp.size()) {
                    res = tmp;
                }
            }
            for (int i = 0; i < 4; i++) {
                g[i] = backup[i].clone();
            }
        }
        System.out.println(res.size());
        for (PII t : res) {
            System.out.println((t.x + 1) + " " + (t.y + 1));
        }
    }

    private static void turn_all(int x, int y) {
        for (int i = 0; i < 4; i++) {
            turn_one(x, i);
            turn_one(i, y);
        }
        turn_one(x, y);
    }

    private static void turn_one(int i, int j) {
        if (g[i][j] == '+') {
            g[i][j] = '-';
        } else {
            g[i][j] = '+';
        }
    }

    private static int index(int i, int j) {
        return 4 * i + j;
    }
}

class PII {
    int x, y;

    public PII(int x, int y) {
        this.x = x;
        this.y = y;
    }
}